// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;

namespace SnapObjects.Expressions
{
    public class CompileMethodMetadata : MethodMetadata<Expression, ParameterExpression>
    {
        public CompileMethodMetadata(string name, ExprMethodDataInfo method)
            : base(name, method)
        {
        }

        public CompileMethodMetadata(MethodMetadata<Expression, ParameterExpression> metadata)
            : base(metadata)
        {
        }
    }

    public class ExprMethodDataInfo : MethodDataInfo<Expression, ParameterExpression>
    {
        public ExprMethodDataInfo(
            MethodInfo method,
            Func<Type[], ExprMethodDataInfo> makeGeneric)
            : base(method, makeGeneric)
        {
        }

        public ExprMethodDataInfo(
            string name,
            Expression body,
            List<MethodParamInfo<ParameterExpression>> parameters,
            int variableParamIndex = -1,
            int optionalParamIndex = -1)
            : base(name, body, parameters, variableParamIndex, optionalParamIndex)
        {
        }
    }
}
